﻿using Domain.Permissions.ValueObjects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.Permissions.Interfaces
{
    /// <summary>
    /// 权限信息缓存
    /// </summary>
    public interface IPermissionCache
    {
        /// <summary>
        /// key:groupName value:list
        /// </summary>
        public IReadOnlyDictionary<string,IReadOnlyList<Permission>> PermissionDict { get; }

        /// <summary>
        /// key:sign value:info
        /// </summary>
        public IReadOnlyDictionary<string,Permission> SignDict { get; }

        public void Reload();

        public Task ReloadAsync();
    }
}
